package com.yunche.yunchebusiness.base

import com.yunche.yunchebusiness.base.mvp.BasePresenter
import com.yunche.yunchebusiness.base.mvp.IBaseView

/**
 * Create by Crcker on 2018/10/16 10:48
 * Email: Crcker@163.com
 */


abstract class BaseMvpActivity<in T : BasePresenter<*>, V : IBaseView> : BaseActivity(), IBaseView {

    private var mPresenter: T? = null

    fun setPresenter(mPresenter: T, mView: V) {
        this.mPresenter = mPresenter
        //this.mPresenter!!.attachView(mView)
    }

    override fun onDestroy() {
        super.onDestroy()
        mPresenter?.detachView()
    }
}